package cn.huiyunche.base.service.enums;

/**
 * @ClassName: InvoiceStatusEnum
 * @Description: 发票表状态
 * @author: Aaron
 * @date: 2016年5月30日 下午1:39:56
 */
public enum InvoiceStatusEnum {

    APPLIED(10, "已申请"),
    INVOICED(20, "已开票"),
    SENT(30, "已邮寄"),
    RECEIVED(40, "已收到");

    private final int value;
    private final String text;

    InvoiceStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static InvoiceStatusEnum getByValue(int value) {
        for (InvoiceStatusEnum temp : InvoiceStatusEnum.values()) {
            if (value == temp.getValue()) {
                return temp;
            }
        }
        return null;
    }
}
